﻿using UnityEngine;
using System.Collections;

public class TypeRed : MonoBehaviour 
{
	public static bool red_mesh_on; 
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Main._state == 0) // turn off
		{
			renderer.enabled = false;
			collider.enabled = false;	
			red_mesh_on = false;
			
		}
	
		if(Main._state == 1) // if red
		{
			renderer.enabled = true;
			collider.enabled = true;	
			red_mesh_on = true;
			
		}
		
		if(Main._state == 2) // if blue
		{
			renderer.enabled = false;
			collider.enabled = false;	
			red_mesh_on = false;
			
		}
	}
}
